#pragma once

#include <QWidget>
#include "logger.h"

namespace WordMemory
{
    class MessageBox : public QWidget
    {
        Q_OBJECT
    public:
        static void show(QWidget *parent, Log::Type type, const QString &text);

        static void info(QWidget *parent, const QString &text);
        static void warning(QWidget *parent, const QString &text);
        static void error(QWidget *parent, const QString &text);

    private:
        explicit MessageBox(QWidget *parent, Log::Type type, const QString &text);
        void setupUi();
        void startAnimation();

        Log::Type m_type;
        QString m_text;
    };
}
